package com.yulang.security;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yulang.security.service.CloudUserService;
import com.yulang.security.vo.CloudResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统-用户表 前端控制器
 * </p>
 *
 * @author Administrator
 * @since 2020-08-02
 */
@RestController
@RequestMapping("/rest/user")
public class CloudUserController {

    @Autowired
    private CloudUserService cloudUserService;

    /**
     * 用户列表查询
     */
    @RequestMapping("/list")
    @ApiOperation(value = "用户列表查询接口")
    public CloudResult getList(){
        return CloudResult.createBySuccess(cloudUserService.list());
    }

    /**
     * 用户列表查询
     */
    @PostMapping("/page")
    @ApiOperation(value = "用户列表查询接口")
    public CloudResult page(@RequestBody Page page){
        return CloudResult.createBySuccess(cloudUserService.page(page));
    }


}

